<extend name="Public/base"/>
<block name="content">
<h3 class="col-md-12">网站设置</h3>
<div class="row">
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<ul class="nav nav-pills">
			   		<volist name="Think.config.CONFIG_GROUP_LIST" id="group">
					<li <eq name="id" value="$key">class="active"</eq>><a href="<{:U('?id='.$key)}>"><{$group}>配置</a></li>
					</volist>					
					<li><a href="<{:U('updrive')}>">驱动配置</a></li>
					<li><a href="<{:U('view')}>">视图配置</a></li>
				</ul>
			</div>
		
			<div class="panel-body">
				<form class="form-horizontal" action="<{:U('save')}>"  method="post">
				<volist name="list" id="config">				
				<div class="form-group">											
					<label class="col-sm-2 control-label"><{$config.title}></label>
					
					<switch name="config.type">
					<case value="0">
					<div class="col-sm-2">
						<input type="text" class="form-control" name="config[<{$config.name}>]" value="<{$config.value}>">
					</div> 
					</case>
					<case value="1">
					<div class="col-sm-4">
						<input type="text" class="form-control" name="config[<{$config.name}>]" value="<{$config.value}>">
					</div>
					</case>
					<case value="2">
					<div class="col-sm-5">
						<textarea class="form-control" name="config[<{$config.name}>]"><{$config.value}></textarea>
					</div>
					</case>
					<case value="3">
					<div class="col-sm-3">
						<textarea class="form-control" name="config[<{$config.name}>]"><{$config.value}></textarea>
					</div>
					</case>
					<case value="4">
					<div class="col-sm-3">
						<select name="config[<{$config.name}>]" class="form-control" style= "width:auto">
						<volist name=":parse_config_attr($config['extra'])" id="vo">
							<option value="<{$key}>" <eq name="config.value" value="$key">selected="selected"</eq>><{$vo}></option>
						</volist>
						</select>
					</div>
					</case>
					</switch>					
					<span class="help-inline"><{$config.remark}></span>			
				</div> 
				</volist>
				
				<div class="form-group">      		
            		<div class="col-sm-4 col-sm-offset-2">
                		<button class="btn btn-default" type="button" onclick="javascript:history.back(-1);return false;">取消</button>
                		<button class="btn btn-primary" type="submit">保存</button>
            		</div>
        		</div>
			</form>
			
		</div>
	</div>
</div>
</block>
<block name="script">
<script type="text/javascript">
	//导航高亮
	highlight_subnav("<{:U('Config/group')}>");
</script>
</block>	


